package com.zcxy.edu.service.impl;

import java.util.List;
import com.zcxy.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zcxy.edu.mapper.EduAllSmsMapper;
import com.zcxy.edu.domain.EduAllSms;
import com.zcxy.edu.service.IEduAllSmsService;

/**
 * 发送短信配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-02
 */
@Service
public class EduAllSmsServiceImpl implements IEduAllSmsService 
{
    @Autowired
    private EduAllSmsMapper eduAllSmsMapper;

    /**
     * 查询发送短信配置
     * 
     * @param id 发送短信配置主键
     * @return 发送短信配置
     */
    @Override
    public EduAllSms selectEduAllSmsById(Long id)
    {
        return eduAllSmsMapper.selectEduAllSmsById(id);
    }

    /**
     * 查询发送短信配置列表
     * 
     * @param eduAllSms 发送短信配置
     * @return 发送短信配置
     */
    @Override
    public List<EduAllSms> selectEduAllSmsList(EduAllSms eduAllSms)
    {
        return eduAllSmsMapper.selectEduAllSmsList(eduAllSms);
    }

    /**
     * 新增发送短信配置
     * 
     * @param eduAllSms 发送短信配置
     * @return 结果
     */
    @Override
    public int insertEduAllSms(EduAllSms eduAllSms)
    {
        eduAllSms.setCreateTime(DateUtils.getNowDate());
        return eduAllSmsMapper.insertEduAllSms(eduAllSms);
    }

    /**
     * 修改发送短信配置
     * 
     * @param eduAllSms 发送短信配置
     * @return 结果
     */
    @Override
    public int updateEduAllSms(EduAllSms eduAllSms)
    {
        eduAllSms.setUpdateTime(DateUtils.getNowDate());
        return eduAllSmsMapper.updateEduAllSms(eduAllSms);
    }

    /**
     * 批量删除发送短信配置
     * 
     * @param ids 需要删除的发送短信配置主键
     * @return 结果
     */
    @Override
    public int deleteEduAllSmsByIds(Long[] ids)
    {
        return eduAllSmsMapper.deleteEduAllSmsByIds(ids);
    }

    /**
     * 删除发送短信配置信息
     * 
     * @param id 发送短信配置主键
     * @return 结果
     */
    @Override
    public int deleteEduAllSmsById(Long id)
    {
        return eduAllSmsMapper.deleteEduAllSmsById(id);
    }
}
